Page 4 of 5 FirstFirst ... 2345 LastLast
Results 31 to 40 of 48

Thread: Purple Elephants Eventhandler

  1. #31
    Developer Todesengel's Avatar
    Join Date
    Dec 2013
    Location
    St. Louis, Missouri, USA
    Posts
    266

    Default

    So I did find the updated elgan strings.scr on another post. It's the one that says it was updated to change string starts to 0 instead of 1 (bet that breaks a lot of mods that use it!). I can confirm that the PE eventhandler still crashes if autoload set to 1 even with that new strings.scr.

  2. #32
    Purple Developer Purple Elephant1au's Avatar
    Join Date
    Feb 2012
    Location
    Australia
    Posts
    1,259

    Default

    Hey,

    Sorry for not looking into this before, wedding planning is getting annoying lol

    I was going to suggest finding the latest strings, which is the one you just mentioned above, because that is the one i use.
    I used the eventhandler you posted above, and it works fine for me on windows, i do not currently have a linux environment to test the mod on, so it might just be a linux issue atm.


    As for the weapon swap, i investigated a bit more, and it seems the stufftext binding issue does not like the level.weapon_swap_key variable that is set from the cvar, but setting it manually will work, so i suggest changing the code to be hardcoded for now.

    Like so
    if(int(getcvar(pe_weapon_swap)) == 1)
    local.player stufftext ("bind i keyp 42")


    Also not i added the int(getcvar....) inside the if statement, you could either do that or just put quotes around the 1
    if(getcvar(pe_weapon_swap) == "1")
    local.player stufftext ("bind i keyp 42")


    Either way would work.

    If the binding still does not work, could do you try just opening up console ( for the player) and typing in the command directly, which is keyp 42


    Ill look at it more after work today

    Kind Regards PE

    Purple's Playground
    OBJ :
    103.29.85.127:12203
    xfire: purpleelephant1au
    email: purpleelephant1au@gmail.com
    skydrive: PurpleElephantSkydrive




  3. #33

    Default

    Quote Originally Posted by JayWest1024 View Post
    Unrelated - I'm hunting around for a good anti-camp mod that has lots of knobs, and not sure that the spawnprotect mod I have works correctly on sp->mp converted maps. Digging in to that today..... (obviously not a big football fan *grin*).
    http://www.mohaaaa.co.uk/AAAAMOHAA/c...a-mod-database
    Below "Sub Category" click on "Spawn Protection" and hit "Apply".
    There are about 5 spawn protect mods in the Database (I've searched for more but it was actually a pain to look for.. although some HUGE mods like admin pro have one included.. I just didn't want to dig in to those).

    Let me know if any of them were what you're looking for, and if you happen to find a different one, also let me know cause I'd love to add it to the database

  4. #34
    Developer Todesengel's Avatar
    Join Date
    Dec 2013
    Location
    St. Louis, Missouri, USA
    Posts
    266

    Default

    Purple....
    I am using the strings.scr that is in the elgbot server side stats v2.2.2. That seems to be the one that own3mall fixed a while back. The eventhandler still locks up if autoload is set on. Let me ask a few sanitycheck questions...

    1) The PE eventhandler works on top of reborn, correct? I mean, it is separate from the reborn built in event handler and can be used simultaneously right? Or was your eventhandler incorporated into reborn and I'm putting something on top of reborn that is a bad idea?

    2) I do not have any event scripts under global/events/*/* I assume thats ok. My thought was turn it on, and add any scripts I want later. Perhaps a bug if auto is on and no scripts exist in the event structure?

    3) I can tell via debug statements that the server crashes (with autoload on) in the line below that has three *** (my own notation) in eventhandler.scr

    auto_events:
    local.events = "spawn"::"connected"::"disconnected"::"damage"::"kill"::"keypress"::"servercommand"::"intermission"
    for(local.i = 1;local.i <= local.events.size;local.i++)
    {
    local.event = local.events[local.i]
    local.path = ("global/events/" + local.event)
    local.list = flist local.path "" 0 ***THIS LINE IS WHERE IT DIES, ABOVE LINE EXECUTES OK

    I'll try your keybinding solution above and report back.

  5. #35
    Developer Todesengel's Avatar
    Join Date
    Dec 2013
    Location
    St. Louis, Missouri, USA
    Posts
    266

    Default

    Apparently, the flist dies (server crash) when that line (flist) above executes without a filter/mask, and when there are no files in the directory specified.
    If I change the "" parameter to be ".scr" (highly likely all files I'd put in the event structure would be scripts), it doesn't crash any longer. In addition, if I put a file in the structure, that event is now autoloaded correctly.

    The docs for flist http://www.x-null.net/wiki/index.php...Commands#flist Seem to indicate that if the 2nd parm doesn't include a "." (and file extension), it will be treated as a filter. In the absence of further understanding on my part, I'm guessing it really should be ".scr", as that would work on both windows and unix platforms for this case. Perhaps the unix . and .. files are confusing the flist code? I'd sure think that would have been noticed already.

    So I suggest that the "" needs to be ".scr", and if it works without that change, some blind luck is occuring?

    J

  6. #36
    Purple Developer Purple Elephant1au's Avatar
    Join Date
    Feb 2012
    Location
    Australia
    Posts
    1,259

    Default

    Hey,

    My event handler is basically a more user friendly way to mange the reborn events, it uses the reborn events. The reborn events o ly allow one script per event, with my event handler, I make it easier to add multiple scripts to each event.

    So the flist on Linux doesnt like no filter, I tested on Windows with no files in the event folders and it worked fine, so it's a Linux issue, and yes I suppose most files are scr so I could use your fix that. I just wanted a more universal option, I will try others later.

    Purple's Playground
    OBJ :
    103.29.85.127:12203
    xfire: purpleelephant1au
    email: purpleelephant1au@gmail.com
    skydrive: PurpleElephantSkydrive




  7. #37
    Developer Todesengel's Avatar
    Join Date
    Dec 2013
    Location
    St. Louis, Missouri, USA
    Posts
    266

    Default

    Ok, got that all working. Your patch above for the swap team weapon (i) does in fact work. I'll play with it a little more (perhaps using string.scr to get it into one variable is worth a shot) and see. Thanks!

    Now that eventhandler is working, I seem to have hit a minor issue in implementing the PE mines mod but I suspect my issue is more eventhandler related than the mine mod itself.

    The only mods on the dev server (besides mefy) are PE eventhandler, PE weapon mod, and PE mine mod. As soon as I start the server, the developer logs show that only the weapon mod is loaded. Sure enough, the weapon mod is fully working and the mine mod acts like it's not installed at all. UNTIL... the first map times out normally and it goes on to the second map. THEN on the next map both the weapon mod AND the PE mine mod works.

    Perhaps in my dmprecache the exec global/mines/mines.scr::main needs to be preceeded by a level waittill spawn?

    Once I did see it say that the mine event was a duplicate... but I'm sure I'm not calling it twice (just in dmprecache)

  8. #38
    Purple Developer Purple Elephant1au's Avatar
    Join Date
    Feb 2012
    Location
    Australia
    Posts
    1,259

    Default

    Yea i will sort out the cvar controlled swap key in time. Sure its something simple.

    Ill have a look at the mine mod, its been awhile since i made it and am unsure how i actually implemented it. I get off work in about 4 hours.

    EDIT:: Having issues with my laptop, So i havent been able to have a look at it yet, ill keep trying
    Last edited by Purple Elephant1au; January 23rd, 2017 at 01:06 AM.

    Purple's Playground
    OBJ :
    103.29.85.127:12203
    xfire: purpleelephant1au
    email: purpleelephant1au@gmail.com
    skydrive: PurpleElephantSkydrive




  9. #39

    Default

    superantispyware :P hihi

  10. #40
    Developer Todesengel's Avatar
    Join Date
    Dec 2013
    Location
    St. Louis, Missouri, USA
    Posts
    266

    Default

    Awesome purple... thanks!
    From a quick glance, it appears that possibly there is some issue with level.run, or for whatever reason it doesn't think that pe_mine_mod is set to 1... until the next map in the rotation. Strange. Maybe level.run conflicts with something and should be replaced by level.mine_run or something?

    Yeah, I know there are other weapon limiters and mine mods out there, but I really like the way you implemented it from the server.cfg side so I can't wait to have it working well (and then start customizing it *grin*).

Page 4 of 5 FirstFirst ... 2345 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •